/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.autoescola.core.entity.security;

import com.autoescola.core.entity.Entitie;
import com.autoescola.core.listener.debug.DebugListener;
import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EntityListeners;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author leonardo luz fernandes
 * @since 02/11/2010
 * @version 0.1
 */

@XmlRootElement(name="Role")
@EntityListeners(value={DebugListener.class})
@Entitie
@Entity
@Table(name="roles")
public class Role implements java.io.Serializable {

    @Id
    @GeneratedValue(strategy=GenerationType.AUTO)
    @Column(name="id",nullable=false,unique=true)
    private Long id ;

    @Column(name="name")
    private String name ;

    @Column(name="description")
    private String description;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="created_at",nullable=false,updatable=false,insertable=true)
    private Date createdAt;

    @Temporal(TemporalType.TIMESTAMP)
    @Column(name="updated_at",nullable=true,updatable=true)
    private Date updatedAt;

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

}//end klass
